﻿using System;
using Topshelf;

namespace Ayatta.Service.Category
{
    public  class Program
    {
        public static void Main()
        {
            try
            {
                HostFactory.Run(x => {
                    x.Service<WinService>(s => {
                        s.ConstructUsing(name => new WinService());
                        s.WhenStarted(tc => tc.Start());
                        s.WhenStopped(tc => tc.Stop());
                    });
                    x.RunAsLocalSystem();

                    x.SetDescription("Ayatta.Service.Category");
                    x.SetDisplayName("Ayatta.Service.Category");
                    x.SetServiceName("Ayatta.Service.Category");

                });
                //var s = CategoryManager.Instance.GetProductProps(50013196);
                //Console.Write(s.Count);
                //Console.ReadLine();
            }
            catch (Exception e)
            {
                Console.Write(e.Message);
                Console.ReadLine();
            }
        }
    }
}
